Skip to content

Replace Gemini CLI support with Antigravity CLI - #30

Merged
amurph491 merged 4 commits into
mainfrom
mihiry/antigravity-migration
Jul 22, 2026
Merged

Replace Gemini CLI support with Antigravity CLI#30
amurph491 merged 4 commits into
mainfrom
mihiry/antigravity-migration

Conversation

@myavalka

@myavalka myavalka commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Migrates plugin from deprecated Gemini CLI to Google's Antigravity CLI platform
  • Renames manifests: gemini-extension.jsonplugin.json, GEMINI.mdANTIGRAVITY.md, hooks/gemini-hooks.jsonhooks/antigravity-hooks.json
  • Unifies hook event to PreToolUse across all three platforms (was BeforeTool on Gemini), matcher to run_command, and uses Antigravity's named-group hook format
  • Settings directory changed from .gemini/ to .agents/; SDK header from gemini-cli-extension to antigravity-cli-plugin
  • Simplifies check-token.sh — all platforms now use the same permissionDecision/updatedInput output format
  • Version bumped to 1.7.0 across all three manifests

Context: Google deprecated Gemini CLI in favor of Antigravity CLI as of June 18, 2026.

Test plan

  • Install plugin on Antigravity CLI via agy plugin install and verify skills load (/skills list)
  • Run /configure on Antigravity CLI and complete OAuth flow
  • Verify token auto-refresh hook fires on Antigravity (copy hooks/antigravity-hooks.json to .agents/hooks.json)
  • Confirm Claude Code and Codex plugin install/functionality is unchanged
  • Verify no remaining gemini references outside CHANGELOG.md historical entries

🤖 Generated with Claude Code

myavalka and others added 2 commits July 3, 2026 14:59
Google deprecated Gemini CLI in favor of Antigravity CLI (June 2026).
This migrates the plugin to the new platform: renamed manifests
(plugin.json, ANTIGRAVITY.md, hooks/antigravity-hooks.json), unified
PreToolUse hook event, .agents/ settings directory, and updated install
commands (agy plugin install). Version bumped to 1.7.0.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Antigravity CLI inherits Gemini's variable names: ${extensionPath} for
hook commands (not ${pluginPath}) and GEMINI_PROJECT_DIR for the project
directory env var. Also corrects hooks copy instruction — agy plugin
install auto-discovers hooks.json at the plugin root.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@myavalka
myavalka marked this pull request as ready for review July 3, 2026 19:38
Resolve conflicts: keep Antigravity naming while incorporating
the new X-Spotify-Ads-Skill header from main.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread hooks.json
@@ -0,0 +1,16 @@
{

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Antigravity only discovers a hook configuration named hooks.json at the plugin root. This file is instead committed as hooks/antigravity-hooks.json, and the PR never creates the required root file. Therefore agy plugin install cannot auto-discover the hook as the documentation claims. Move or copy this configuration to /hooks.json as part of the plugin package; do not rely on a manual post-install step.

Comment thread hooks/check-token.sh Outdated
Comment thread hooks/check-token.sh

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Antigravity supplies PreToolUse commands at .toolCall.args.CommandLine, not under .tool_input.command, .input.command, or their cmd variants. The command extraction around line 62 therefore returns an empty string for every Antigravity run_command, and the following guard exits before refreshing the token. Parse .toolCall.args.CommandLine on Antigravity.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was actually already handled — the jq expression at line 65-72 includes .toolCall.args.CommandLine and .toolCall.args.command in the fallback chain (via //). It tries Claude/Codex paths first and falls through to the Antigravity paths. Additionally, the fast-path check on line 23 matches api-partner.spotify.com anywhere in the raw stdin JSON, so the hook fires correctly regardless of which field contains the command.

Address review feedback:
- Use documented PreToolUse output schema (decision/reason) instead
  of made-up allow_tool/systemMessage fields
- Move hooks.json to plugin root for auto-discovery by both
  Antigravity CLI and Antigravity 2.0
- Remove redundant hooks/antigravity-hooks.json
- Update docs to reference both Antigravity CLI and 2.0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@myavalka

Copy link
Copy Markdown
Collaborator Author

Re: hooks/antigravity-hooks.json discovery — fixed in 253085b. hooks.json now lives at the plugin root, auto-discovered by both Antigravity CLI (agy plugin install) and Antigravity 2.0 (.agents/plugins/ workspace discovery). Removed the redundant hooks/antigravity-hooks.json and the manual copy step from ANTIGRAVITY.md.

@amurph491
amurph491 merged commit 1421ab6 into main Jul 22, 2026
@amurph491
amurph491 deleted the mihiry/antigravity-migration branch July 22, 2026 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants